package library.and.xps.com.step.chatFormatter;

import com.github.mikephil.charting.charts.BarLineChartBase;
import com.github.mikephil.charting.components.AxisBase;
import com.github.mikephil.charting.formatter.IAxisValueFormatter;
import com.jude.utils.JUtils;

import java.util.ArrayList;

import library.and.xps.com.step.m.model.WeeklyRecord;

public class WeekAxisValueFormatter implements IAxisValueFormatter {

    private BarLineChartBase<?> chart;
    private ArrayList<WeeklyRecord> records;

    public WeekAxisValueFormatter(BarLineChartBase<?> chart, ArrayList<WeeklyRecord> re) {
        this.chart = chart;
        this.records = re;
        JUtils.Log("WeekAxisValueFormatter",records.size()+"--------");
    }

    @Override
    public String getFormattedValue(float value, AxisBase axis) {
        JUtils.Log("WeekAxisValueFormatter","");
        WeeklyRecord re = records.get((int) value);
        if (re.getStepsAverage() == 0)
            return "asdasdw23d2ex";

        return "·";
    }

}
